package cc.magicjson.summary.errors.clz.not.found;

/**
 * {@link}
 *
 * @author <a href="mailto:it_magicjson@163.com">MagicJson</a>
 * @since 1.0.0
 */ // DatabaseLogger.java
public class DatabaseLogger extends Logger {
    static {
        try {
            // 模拟数据库连接初始化
            if (true) { // 50% 概率初始化失败
                throw new RuntimeException("Database connection failed");
            }
        } catch (Exception e) {
            throw new ExceptionInInitializerError(e);
        }
    }

    @Override
    public void log(String message) {
        // 实现数据库日志逻辑
        System.out.println("DB logging: " + LOG_PREFIX + message);
    }
}
